//
//  HSYWaterWaveView+Show.m
//  高仿暴走斗图
//
//  Created by key on 16/9/26.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "HSYWaterWaveView+Show.h"

@implementation HSYWaterWaveView (Show)

#pragma mark - Show

+ (HSYWaterWaveView *)showWaterWaveViewForWaveParamter:(NSDictionary<NSNumber *, id> *)paramter waveFrame:(CGRect)frame showInView:(UIView *)view
{
    HSYWaterWaveView *waverWaveView = [[HSYWaterWaveView alloc] initWithFrame:frame];
    
    waverWaveView.waveSpeed = [paramter[@(kWaterWaveParamterKeyTypeWaveSpeed)] floatValue];
    waverWaveView.waveUpGrowth = [paramter[@(kWaterWaveParamterKeyTypeWaveUpGrowth)] floatValue];
    
    waverWaveView.firstWaveColor = paramter[@(kWaterWaveParamterKeyTypeWaveFirstColor)];
    waverWaveView.secondWaveColor = paramter[@(kWaterWaveParamterKeyTypeWaveSecondColor)];
    waverWaveView.upMaxPercent = [paramter[@(kWaterWaveParamterKeyTypeWaveUpMaxPercent)] floatValue];
    
    [waverWaveView wave];
    [view addSubview:waverWaveView];
    
    return waverWaveView;
}

@end
